
var dischargeRate : double = 100.0;
var playerState : PlayerState;
	
function Start() {
	playerState = GetComponent("PlayerState");
}

function Update () {

	if(Input.GetButton("Jump")){
		playerState.IncreaseOff();
		playerState.RemoveCharge();
	}
	if(Input.GetButtonUp("Jump")){
		playerState.IncreaseOn();
	}
}

@script RequireComponent(PlayerState);